<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="referrer" content="no-referrer" />
    <title>闪烁圆环</title>
    <style>
        body {
            position: absolute;
            margin: 0;
            width: 100%;
            height: 100%;
        }

        #mapContainer {
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            float: left;
        }
    </style>
</head>

<body>
    <div id="mapContainer" style="position: relative;"></div>
</body>
<script src='/GiswayEngine.js'></script>
<script type="text/javascript">
    window.app = new GE.App('mapContainer', {
        position: [121.547119, 28.585165, 1000],
        lookAt: [121.547119, 28.585165, 0], 
        cameraScrollSpeed: 5,
        minZoom: 1,
        maxZoom: 18,
        ambientLightIntensity: 5,
        useDefaultTexture: true, //是否使用瓦片默认纹理
        fogColor: '#66CCFF', //雾的颜色
        fogStartAngle: 40, //雾开始的角度
        // background: "Sky",
        isUseMapCarpet: true, //是否开启地图的地毯底图，避免地图拖动的时候没来得及加载的瓦片一片空白
        baseLayer: [//
            {
                url: 'https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
                urlDecimal: true,
                tileType: 'image',
                isSelect: true, //是否可以被选中
            },
        ]
    });

    // window.app.on('Click', function (e) {
    //     console.log(e);
    // });
    BlinkingRing();   
    function BlinkingRing() {
        let BlinkingRing = new GE.BlinkingRing({
            center: [121.548119, 28.585165, 10],
            radius: 50,
            innerRadius: 25,
            color: '#ff00ff',
            time: 1000
        });
        app.add(BlinkingRing);
        window.effect = BlinkingRing;
    }

    btn();    
    function btn() {
        let button1 = new GE.Button('圆环内径', function () {
            window.effect.innerRadius = prompt('圆环内径：', Number(window.effect.innerRadius))||Number(window.effect.innerRadius);
        });
        app.ui.add(button1);
        
        let button2 = new GE.Button('圆环外径', function () {
            window.effect.radius = prompt('圆环外径：',  Number(window.effect.radius))||Number(window.effect.radius);
        });
        app.ui.add(button2);

        let button3 = new GE.Button('圆环颜色', function () {
            window.effect.v_color = prompt('圆环颜色：',  window.effect.v_color)||window.effect.v_color;
        });
        app.ui.add(button3);
    }

</script>

</html>